import {  lazy } from "react";
import { createBrowserRouter } from 'react-router-dom'
const Home = lazy(() => import('../pages/Home/index'))
const Login = lazy(() => import('../pages/Login/index'))
type routerType = {
    path: string,
    element: JSX.Element,
    children?: {
        path: string,
        element: JSX.Element,
    }[]

}[]

const routes:routerType = [
    {
        path: '/',
        element: <Home></Home>,
        children: [
            {
                path: '/login',
                element: <Login></Login>
            }
        ]
    }
]

const router=createBrowserRouter(routes)
export default router